package com.kj.xuyuan.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kj.xuyuan.R;
import com.kj.xuyuan.model.VipListBean;
import com.kj.xuyuan.util.DisplayUtil;
import com.kj.xuyuan.util.ScreenUtils;

import java.util.List;

import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;

public class VipListAdapter extends BaseQuickAdapter<VipListBean, BaseViewHolder> {

    public VipListAdapter() {
        super(R.layout.item_vip_center);
    }

    @Override
    protected void convert(BaseViewHolder helper, VipListBean item) {
        helper.setText(R.id.tv_time,item.getTitle());
        helper.setText(R.id.tv_price,item.getPrice());
//        ImageView ivBg = helper.getView(R.id.iv_bg);
//        ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams)ivBg.getLayoutParams();
//        layoutParams.width = (ScreenUtils.getScreenWidth(mContext)-DisplayUtil.dp2px(mContext,12))/3;
//        ivBg.setLayoutParams(layoutParams);
    }
}
